{% extends "base.html" %}
{% block title %}组信息查询{% endblock %}
{% block content %}
    <table class="staff_table">
        <caption>组信息表</caption>
        <tr class="row_head">
            <th class="st_group">组名</th>
            <th class="st_leader">组长姓名</th>
            <th class="st_ratio">人数</th>
        </tr>
        {% for rec in record %}
        <tr class="row_{{loop.cycle('odd','even')}}">
            {% if loop.revindex0 == 0 %}
                <td colspan="2">合计</td>
            {% else %}
                <td>{{rec['group_name'] if rec['group_name'] else '未分组'}}</td>
                <td>{{rec['leader_name'] if rec['leader_name'] else '-'}}</td>
            {% endif %}
            <td>{{rec['count']}}</td>
        </tr>
        {% endfor %}
    </table>
{% endblock %}
